package com.jinjia.ordersys.controller;

import com.github.pagehelper.PageInfo;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description: 基础-Controller
 * @Param:
 * @return:
 * @Author: fenghouzhi
 * @Date: 2:04 PM 2018/10/9
 */
public class BaseController {

    Map<String, Object> getDataForPage(PageInfo<?> pageInfo) {
        Map<String, Object> rsponseData = new HashMap<>(2);
        rsponseData.put("rows", pageInfo.getList());
        rsponseData.put("total", pageInfo.getTotal());
        return rsponseData;
    }

}